<?php

namespace App\Http\Controllers;

use App\Article;
use Illuminate\Http\Request;

class ArticleController extends Controller
{

    public function index()
    {
//        dump(Article::all()->toArray());
    
        // will return what defined in article model toSearchableArray() and return all lines containing theses words
        $first = Article::search('ullam nobis omnis')->get()->toArray();
        dump($first);
        $ar = Article::search('hansen')->get()->toArray();
        dump($ar);
        $ar_search = Article::whereContent('Fuga')->get()->toArray();
        dd($ar_search);
    }
    
}
